﻿CREATE TABLE [maint].[DefragLog] (
    [DatabaseName]   [sysname] NOT NULL,
    [TableName]      [sysname] NOT NULL,
    [IndexName]      [sysname] NOT NULL,
    [Pages Scanned]  INT       NOT NULL,
    [Pages Moved]    INT       NOT NULL,
    [Pages Removed]  INT       NOT NULL,
    [FragThreshold]  INT       NOT NULL,
    [LogicalFrag]    INT       NOT NULL,
    [DefragTime]     DATETIME  NOT NULL,
    [DefragDuration] INT       NOT NULL,
    CONSTRAINT [PK_MaintDefragLogKey] PRIMARY KEY CLUSTERED ([DefragTime] ASC, [DatabaseName] ASC, [TableName] ASC, [IndexName] ASC)
);

